package br.com.fidalgotecnologia.layar.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;


@Entity
@Table(schema="poi", name="action")
@SequenceGenerator(sequenceName="poi.action_id_seq" , name="action_seq")
public class Action implements Serializable {
	private Long id;
	private String uri;
	private String label;
	private String contentType;
	private String method;
	private boolean closeBiw;
	private int activityType;
	private boolean showActivity;
	private String activityMessage;
	private Long autoTriggerRange;
	private boolean autoTrigger;
	private boolean autoTriggerOnly;
	private Layer layer;
	private HotSpot hotSpot;
	@Id
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="action_seq")
	@Column(name="id")
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	@Column(name="uri")
	public String getUri() {
		return uri;
	}
	public void setUri(String uri) {
		this.uri = uri;
	}
	@Column(name="label")
	public String getLabel() {
		return label;
	}
	public void setLabel(String label) {
		this.label = label;
	}
	@Column(name="content_type")
	public String getContentType() {
		return contentType;
	}
	public void setContentType(String contentType) {
		this.contentType = contentType;
	}
	@Column(name="method")
	public String getMethod() {
		return method;
	}
	public void setMethod(String method) {
		this.method = method;
	}
	
	@Column(name="close_biw")
	public boolean isCloseBiw() {
		return closeBiw;
	}
	public void setCloseBiw(boolean closeBiw) {
		this.closeBiw = closeBiw;
	}
	@Column(name="activity_type")
	public int getActivityType() {
		return activityType;
	}
	public void setActivityType(int activityType) {
		this.activityType = activityType;
	}
	@Column(name="show_activity")
	public boolean isShowActivity() {
		return showActivity;
	}
	public void setShowActivity(boolean showActivity) {
		this.showActivity = showActivity;
	}
	@Column(name="activity_message")
	public String getActivityMessage() {
		return activityMessage;
	}
	public void setActivityMessage(String activityMessage) {
		this.activityMessage = activityMessage;
	}
	@Column(name="autotrigger_range")
	public Long getAutoTriggerRange() {
		return autoTriggerRange;
	}
	public void setAutoTriggerRange(Long autoTriggerRange) {
		this.autoTriggerRange = autoTriggerRange;
	}
	@Column(name="autotrigger")
	public boolean isAutoTrigger() {
		return autoTrigger;
	}
	public void setAutoTrigger(boolean autoTrigger) {
		this.autoTrigger = autoTrigger;
	}
	@Column(name="autotrigger_only")
	public boolean isAutoTriggerOnly() {
		return autoTriggerOnly;
	}
	public void setAutoTriggerOnly(boolean autoTriggerOnly) {
		this.autoTriggerOnly = autoTriggerOnly;
	}
	@ManyToOne
	@JoinColumn(name="layer_id", nullable=true)
	public Layer getLayer() {
		return layer;
	}
	public void setLayer(Layer layer) {
		this.layer = layer;
	}
	@ManyToOne
	@JoinColumn(name="hotSpot_id", nullable=true)
	public HotSpot getHotSpot() {
		return hotSpot;
	}
	public void setHotSpot(HotSpot hotSpot) {
		this.hotSpot = hotSpot;
	}
	
	
}